AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:SpawnFunction( ply, tr)
	local SpawnPos = tr.HitPos + tr.HitNormal * 100
	local ent = ents.Create( "moneydrop" )
	ent:SetPos( SpawnPos )
	ent:Spawn()
	ent:Activate()
	return ent
end

function ENT:Initialize()
	self.Entity:SetUseType( SIMPLE_USE )
	self.Firee=nil
	self.Inflight=false
	self.Pilot=nil
	self.Entity:SetModel("models/props_combine/headcrabcannister01a.mdl")	
	self.Entity:PhysicsInit( SOLID_VPHYSICS )
	self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
	self.Entity:SetSolid( SOLID_VPHYSICS )
		local phys = self.Entity:GetPhysicsObject()
		if (phys:IsValid()) then
			phys:Wake()
			phys:SetMass(50000)
		end
	self.amount = 0
end

function ENT:Use(ply,caller)
	Changemoney (ply,self.amount)
	self.Entity:Remove()
end